<template>
<view>
    <rich-text :nodes="infoDesc" ></rich-text>
            <!-- 授权弹窗 -->
        <s-auth-modal />
</view>
</template>

<script>
import { getByKeyApi} from "@/sheep/api/index";
export default {
    name: "aboutUs",
    data() {
        return {
            type:'',
            infoDesc:''
        }
    },
    onLoad(options) {
        this.type = options.type
        //设置顶部标题
        uni.setNavigationBarTitle({
            title: this.type==1?'用户协议':'关于我们'
        })
        let key = this.type==1?'yhxy':'gywm'
        this.getData(key)
        // this.infoDesc = this.infoDesc.replace(/<img/g, '<img style="width:100%" @click="handlePrive"' );
    },
    methods:{
          async getData(key) {
            let res = await getByKeyApi(key);
            this.infoDesc = res.data[0]?.configValue;
            this.infoDesc = this.infoDesc.replace(/<img/g, '<img style="width:100%" ' );
        },
    }
}
</script>

<style scoped lang="scss">

</style>
